#ifndef BLOCKSTOREDELEGATE_H
#define BLOCKSTOREDELEGATE_H

#include <QStyledItemDelegate>
#include <QPainter>

class BlockStoreDelegate : public QStyledItemDelegate
{
    Q_OBJECT

public:
    explicit BlockStoreDelegate(QObject *parent = nullptr);

    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
    QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;

private:
    void drawBlockItem(QPainter *painter, const QRect &rect, const QString &text, bool isAvailable) const;
};

#endif // BLOCKSTOREDELEGATE_H
